<template>
  <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[10, 20, 30, 40]"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: {
    total: {
      default: 0,
    },
  },
  data() {
    return {
      currentPage: 1,
      pageSize: 10,
    };
  },
  methods: {
    handleSizeChange(val) {
      this.pageSize = val;
      this.$emit("qureyBtnFn",val)
    },
    handleCurrentChange(val) {
      this.$emit("qureyBtnFn",val)
      this.currentPage = val;
    },
    
  },
};
</script>

<style scoped lang="less">
.block {
  display: flex;
  justify-content: right;
}
</style>